<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>企查查</title>

    <link href="http://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="style.css">
    <script src="{% static 'js11/jquery-2.1.4.min.js' %}"></script>

    <style>
        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            padding: 0;
            background: #494A5F;
            font-weight: 500;
            font-family: "Microsoft YaHei", "宋体", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo;
        }

        #container {
            width: 500px;
            height: 820px;
            margin: 0 auto;
        }

        div.search {
            padding: 30px 0;
        }

        form {
            position: relative;
            width: 300px;
            margin: 0 auto;
        }

        input, button {
            border: none;
            outline: none;
        }

        input {
            width: 100%;
            height: 42px;
            padding-left: 13px;
        }

        button {
            height: 42px;
            width: 42px;
            cursor: pointer;
            position: absolute;
        }

        /*搜索框1*/
        .bar1 {
            background: #A3D0C3;
        }

        .bar1 input {
            border: 2px solid #7BA7AB;
            border-radius: 5px;
            background: #F9F0DA;
            color: #9E9C9C;
        }

        .bar1 button {
            top: 0;
            right: 0;
            background: #7BA7AB;
            border-radius: 0 5px 5px 0;
        }

        .bar1 button:before {
            content: "\f002";
            font-family: FontAwesome;
            font-size: 16px;
            color: #F9F0DA;
        }
    </style>
    <script type="text/javascript">
        function keywords1() {
            var words = $('#word').val();
            alert(words);

            $.ajax({
                type: 'GET',
                url: "/index/index_logic/",
                data: 'words=' + words,
                success: function (msg) {
                   alert(msg)
                }
            })
        }
    </script>
</head>
<body>
<div id="container">
    <div class="search bar1">
        <form action="{% url 'index:index_logic' %}" method="get">

            <input type="text" name='words' placeholder="请输入您要搜索的内容..." id="word" onblur="keywords()" value="">
            <button type="submit"></button>
        </form>
    </div>

</div>


</body>
</html>